<div class="simple-form">
    <h1>Transaction History</h1>
    <div class="line"></div>
    <div class="clear"></div>
    <form name="frmSearch"  action="{dev_get_page_link page=PAGE_ACCOUNT_TRANSACTIONS ssl=true}"   method="post">
        <div  id="ajaxSearchContent" {if $action!='process_search'} style="display:none" {/if} >
              <h3>Search Filter</h3>
            <input type="hidden" name="action" value="process_search" >

            <table class="form">
                <tr>
                    <td>
                        From Date</td><td>
                        <select name="fromdateMonth" >
                            {html_options options=$months_array selected=$fromdateMonth}</select>&nbsp;<select name="fromdateDay">
                            {html_options options=$days_array selected=$fromdateDay}</select>&nbsp;&nbsp;

                        <select name="fromdateYear">
                            {html_options options=$years_array selected=$fromdateYear}</select>&nbsp;(mm/dd/yy)</td></tr>
                <tr><td>To Date</td><td><select name="todateMonth" >
                            {html_options options=$months_array selected=$todateMonth}</select>&nbsp;<select name="todateDay">
                            {html_options options=$days_array selected=$todateDay}</select>&nbsp;&nbsp;

                        <select name="todateYear">
                            {html_options options=$years_array selected=$todateYear}</select>&nbsp;(mm/dd/yy)</td></tr>
                <tr><td>&nbsp;</td><td><input name="search_date_filter"    type="checkbox" value="1"  {if $search_date_filter } checked="checked" {/if}> Search using dates filter</td></tr>
                <tr><td>Batch Number#</td><td>
                        <input name="batch_number"   size="12" maxlength="12"  value="{$batch_number}"  type="text">
                    </td></tr>
                <tr><td>From Account</td><td>

                        <input name="from_account"   type="text" value="{$from_account}" size="20" >
                    </td></tr>
                <tr><td>To Account</td><td>

                        <input name="to_account"   type="text" value="{$to_account}" size="20">
                    </td></tr>
                <tr><td>Transaction Reference</td><td>
                        <input name="transaction_note"   value="{$transaction_note}" type="text" size="50">
                    </td></tr>
            </table>
        </div>
        <table class="form">
            <tr><td></td>
                <td>
                    <input type="button"  class="button" id="buttonSearch"  value="Search Transaction" />
                </td>
            </tr>
        </table>
    </form>


    <div  id="ajaxDetailsContent" style="display:none"  ></div>
    <table width="100%" class="list">
        <thead>
            <tr>
                <td height="28" class="tableHeading">Date</td>
                <td class="tableHeading">Batch#</td>
                <td class="tableHeading">From Account</td>			  			  
                <td class="tableHeading">To Account</td>			  
                <td class="tableHeading">Amount</td>			
                <td class="tableHeading">Fee</td>			
                <td class="tableHeading">Memo</td>			
                <td class="tableHeading" align="center">
                    Currency</td>			  			  			    			    			  			    
                <td class="tableHeading" align="center">
                    {$TEXT_ACTION}</td>
            </tr>
        </thead>
        <tbody>
            {section name=transactionidx loop=$transactions}	
            {if ($smarty.section.transactionidx.index  % 2) == 0 } {assign var="rowstyle"  value="tableNormalRow"} {else}  {assign var="rowstyle" value="tableAltRow"}  {/if}

            <tr>
                <td width="22%" height="25"  class="{$rowstyle}">
                    {$transactions[transactionidx].transaction_time|date_format:"%m/%d/%Y %l:%M %p" }</td>
                <td class="{$rowstyle}">{$transactions[transactionidx].batch_number}</td>
                <td class="{$rowstyle}">{$transactions[transactionidx].from_account}</td>			  			  			  
                <td class="{$rowstyle}"><strong>{$transactions[transactionidx].to_account}</strong></td>			  			  
                <td class="{$rowstyle} currentcy" >{if $transactions[transactionidx].from_userid == $smarty.session.login_userid}<span class="red">-{$transactions[transactionidx].amount_text}</span>{else} <span class="green">+{$transactions[transactionidx].amount_text}</span>{/if}</td>			  
                <td class="{$rowstyle} currentcy" >{$transactions[transactionidx].fee_text}&nbsp;</td>	
                <td class="{$rowstyle}" align="center">
                    {$transactions[transactionidx].transaction_currency}</td>			  			  			  
                <td width="17%"  class="{$rowstyle}"  align="center"><a href="javascript:getTransactionDetails({$transactions[transactionidx].transaction_id});" class="linkButton">
                        Details</a></td>
            </tr>
            {/section} 
        </tbody>
    </table>

    {if count($transactions)>0}  
    <div align="center">{$TEXT_PAGES}{$page_links}</div>
    {/if} 
</div>
